﻿

namespace log_mgr {
    using log4net.Core;
    using log4net.Layout.Pattern;
    using System.IO;

    public class paremter_content {
        internal sealed class UserIdParam : PatternLayoutConverter {
            // Methods  
            protected override void Convert(TextWriter writer, LoggingEvent loggingEvent) {
                var content = loggingEvent.MessageObject as message;
                if (content != null) {
                    writer.Write(content.user);
                }
            }
        }

        internal sealed class messageParam : PatternLayoutConverter {
            // Methods  
            protected override void Convert(TextWriter writer, LoggingEvent loggingEvent) {
                var content = loggingEvent.MessageObject as message;
                if (content != null) {
                    writer.Write(content.msg);
                }
            }
        }

        internal sealed class clParam : PatternLayoutConverter {
            // Methods  
            protected override void Convert(TextWriter writer, LoggingEvent loggingEvent) {
                var content = loggingEvent.MessageObject as message;
                if (content != null) {
                    writer.Write(content.cl);
                }
            }
        }
    }
}
